package com.grupobbva.iici.entity;

import com.ibm.ejs.container.*;

/**
 * EJSCMPTiici_logHomeBean_0aa0d06a
 */
public class EJSCMPTiici_logHomeBean_0aa0d06a extends EJSHome {
	/**
	 * EJSCMPTiici_logHomeBean_0aa0d06a
	 */
	public EJSCMPTiici_logHomeBean_0aa0d06a() throws java.rmi.RemoteException {
		super();	}
	/**
	 * findByPrimaryKey_Local
	 */
	public com.grupobbva.iici.entity.Tiici_logLocal findByPrimaryKey_Local(com.grupobbva.iici.entity.Tiici_logKey primaryKey) throws javax.ejb.FinderException, java.rmi.RemoteException {
		return (com.grupobbva.iici.entity.Tiici_logLocal)super.activateBean_Local(primaryKey);
	}
	/**
	 * create_Local
	 */
	public com.grupobbva.iici.entity.Tiici_logLocal create_Local(java.math.BigDecimal cod_log) throws javax.ejb.CreateException, java.rmi.RemoteException {
		BeanO beanO = null;
		com.grupobbva.iici.entity.Tiici_logLocal result = null;
		boolean createFailed = false;
		boolean preCreateFlag = false;
		try {
			beanO = super.createBeanO();
			com.grupobbva.iici.entity.Tiici_logBean bean = (com.grupobbva.iici.entity.Tiici_logBean) beanO.getEnterpriseBean();
			preCreateFlag = super.preEjbCreate(beanO);
			bean.ejbCreate(cod_log);
			Object ejsKey = keyFromBean(bean);
			result = (com.grupobbva.iici.entity.Tiici_logLocal) super.postCreate_Local(beanO, ejsKey, true);
			bean.ejbPostCreate(cod_log);
			super.afterPostCreate(beanO, ejsKey);
		}
		catch (javax.ejb.CreateException ex) {
			createFailed = true;
			throw ex;
		} catch (java.rmi.RemoteException ex) {
			createFailed = true;
			throw ex;
		} catch (Throwable ex) {
			createFailed = true;
			throw new CreateFailureException(ex);
		} finally {
			if(preCreateFlag && !createFailed)
				super.afterPostCreateCompletion(beanO);
			if (createFailed) {
				super.createFailure(beanO);
			}
		}
		return result;
	}
	/**
	 * keyFromBean
	 */
	public Object keyFromBean(javax.ejb.EntityBean generalEJB) {
		com.grupobbva.iici.entity.ConcreteTiici_log_0aa0d06a tmpEJB = (com.grupobbva.iici.entity.ConcreteTiici_log_0aa0d06a) generalEJB;
		com.grupobbva.iici.entity.Tiici_logKey keyClass = new com.grupobbva.iici.entity.Tiici_logKey();
		keyClass.cod_log = tmpEJB.getCod_log();
		return keyClass;
	}
	/**
	 * keyFromFields
	 */
	public com.grupobbva.iici.entity.Tiici_logKey keyFromFields(java.math.BigDecimal f0) {
		com.grupobbva.iici.entity.Tiici_logKey keyClass = new com.grupobbva.iici.entity.Tiici_logKey();
		keyClass.cod_log = f0;
		return keyClass;
	}
}
